<?php
require_once 'Zend/Loader.php';

Zend_Loader::loadClass('Zend_Config');
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Config_Writer');
Zend_Loader::loadClass('Zend_Config_Writer_Xml');
Zend_Loader::loadClass('Zend_Config_Writer_Ini');


$config = new Zend_Config(array(), true);
$config->production	= array();
$config->staging	= array();
$config->cache		= array();

$config->setExtend('staging', 'production','cache');

$config->production->db = array();
$config->production->db->host	= 'localhost';
$config->production->db->username	= 'root';
$config->production->db->password	= 'liulizhi';
$config->production->db->dbname	= 'openx';


$config->production->smtp = array();
$config->production->smtp->hostname	= 'smtp.yuyu.com';
$config->production->smtp->username	= 'kefu@yuyu.com';
$config->procuction->smtp->password	= 'yuyu.com';
$config->production->smtp->port		= '25';

$config->staging->db = array();
$config->staging->db->hostname	= 'localhost';
$config->staging->db->username	= 'root';
$config->staging->db->password	= 'liulizhi';
$config->staging->db->database	= 'open';
$config->staging->db->charset	= 'UTF8';
$config->staging->db->port		= '3306';

$config->cache->type = 'File';

$config->cache->file = array();
$config->cache->file->dir		= './tmp/';
$config->cache->file->time		= '3600';

$config->cache->memory = array();
$config->cache->memory->size	= '128M';

$config->cache->db = array();
$config->cache->db->hostname	= 'localhost';
$config->cache->db->username	= 'root';
$config->cache->db->password	= 'liulizhi';
$config->cache->db->database	= 'openxcache';
$config->cache->db->charset		= 'UTF8';
$config->cache->db->port		= '3306';

$config->dir = array();
$config->dir->lib		= './lib/';
$config->dir->smarty = array();
$config->dir->smarty->template	= './var/template/';
$config->dir->smarty->compile	= './var/compile/';
$config->dir->smarty->cache		= './tmp/';
$config->dir->smarty->plugins	= './var/plugins/';

$config->install = array();
$config->install->dir = './install/';
$config->install->lock = './tmp/lock.file';

$config->sys = array();
$config->sys->lanague = 'zh';
$config->sys->timezone = 'UTC';
$config->sys->manager = 'lizhi';
$config->sys->manageremail = 'lizhi.liu@yuyu.com';
$config->sys->tel = '13524084051';


$writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename'=>'config.ini'));
$writer->write();
?>